/* 
        PROGRAM: Thanatos
        AUTHOR: Dwyer, Patrick; Easton, Sean; Roy, Bobby 
        FSU GARNET ID: pmd04; sde07; rcr05e
        COURSE INFORMATION: CNT5412
        Due Date: 04/19/2011
        
        SUMMARY 
                The definition of the FreenetNode class
*/

#include "Node.h"

#include <netinet/in.h>

//#include <boost/shared_prt.hpp>

#include <vector>
#include <string>

using std::vector;
using std::string;
//using boost::shared_prt;

#ifndef _FREENET_NODE
#define _FREENET_NODE

#define NAME "ThanatosSpider"
#define FREENET_VERSION "2.0"


class FreenetNode: public Node
{
    private:
    /*
    From Node
    struct sockaddr_in m_address;
    vector<Node*> m_peers;
    int m_socketDesc;
    */

    /*
    TODO
    Stats
    */
    string parseMessage(char* msg, int msgLen);

    public:
    static const int MAX_BUFFER_LEN = 4096;

    FreenetNode();
    // should this be vector<shared_ptr<Node> > ??
    /* I don't believe so, FreenetNode isa Node. I could see it working ether
    way - sean*/
    FreenetNode(string ip, string port);
    FreenetNode(struct sockaddr_in, vector<FreenetNode*>);
    FreenetNode(const FreenetNode& rhs);
    ~FreenetNode();

    int Connect();
    int Disconnect();
    vector<Node*> GetPeers();
};

#endif // _FREENET_NODE
